
package todolist.personalization;

/**
 * Controls application behaviour related to executable Command input and display.
 * Singleton class.
 * Currently allows getting only, may allow reading/setting/writing in the future.
 * @author Ivan
 */
public class CommandCustomizer {

	// handle singleton instance

	private static CommandCustomizer _objCC;

	public static CommandCustomizer getInstance() {
		if (_objCC == null)
			_objCC = new CommandCustomizer();
		return _objCC;
	}

	// input Command Type

	private static final String[] COMMAND_INPUT_ADD = {
		"01.", "Add", "new", "mk", "+"};
	private static final String[] COMMAND_INPUT_EDIT = {
		"02.", "Edit", "Update", "Modify", "Change", "Set", ">"};
	private static final String[] COMMAND_INPUT_DELETE = {
		"03.", "Delete", "Remove", "rmdir", "-"};
	private static final String[] COMMAND_INPUT_DETAILS = {
		"04.", "Details", "Select", "View", "Show"};
	private static final String[] COMMAND_INPUT_LIST = {
		"05.", "Listall", "Display", "dir", "ls"};
	private static final String[] COMMAND_INPUT_SEARCH = {
		"06.", "Search", "srch", "Find", "grep", "?"};
	private static final String[] COMMAND_INPUT_SORT = {
		"07.", "Sort", "Order"};
	
	// display Command Type
	
	private static final String COMMAND_DISPLAY_ADD = "01. Add";
	private static final String COMMAND_DISPLAY_EDIT = "02. Edit";
	private static final String COMMAND_DISPLAY_DELETE = "03. Delete";
	private static final String COMMAND_DISPLAY_DETAILS = "04. Details";
	private static final String COMMAND_DISPLAY_LIST = "05. List";
	private static final String COMMAND_DISPLAY_SEARCH = "06. Search";
	private static final String COMMAND_DISPLAY_SORT = "07. Sort";
	
	// input Command Type

	/**
	 * Returns all keywords representing the Add Command.
	 */
	public String[] getInputAddCommand() {
		return COMMAND_INPUT_ADD;
	}

	/**
	 * Returns all keywords representing the Edit Command.
	 */
	public String[] getInputEditCommand() {
		return COMMAND_INPUT_EDIT;
	}

	/**
	 * Returns all keywords representing the Delete Command.
	 */
	public String[] getInputDeleteCommand() {
		return COMMAND_INPUT_DELETE;
	}
	
	/**
	 * Returns all keywords representing the Details Command.
	 */
	public String[] getInputDetailsCommand() {
		return COMMAND_INPUT_DETAILS;
	}
	
	/**
	 * Returns all keywords representing the List Command.
	 */
	public String[] getInputListCommand() {
		return COMMAND_INPUT_LIST;
	}
	
	/**
	 * Returns all keywords representing the Search Command.
	 */
	public String[] getInputSearchCommand() {
		return COMMAND_INPUT_SEARCH;
	}
	
	/**
	 * Returns all keywords representing the Sort Command.
	 */
	public String[] getInputSortCommand() {
		return COMMAND_INPUT_SORT;
	}
	
	// display Command Type
	
	/**
	 * Add Command, as viewed by the user.
	 */
	public String getDisplayAddCommand() {
		return COMMAND_DISPLAY_ADD;
	}

	/**
	 * Edit Command, as viewed by the user.
	 */
	public String getDisplayEditCommand() {
		return COMMAND_DISPLAY_EDIT;
	}

	/**
	 * Delete Command, as viewed by the user.
	 */
	public String getDisplayDeleteCommand() {
		return COMMAND_DISPLAY_DELETE;
	}
	
	/**
	 * Details Command, as viewed by the user.
	 */
	public String getDisplayDetailsCommand() {
		return COMMAND_DISPLAY_DETAILS;
	}
	
	/**
	 * List Command, as viewed by the user.
	 */
	public String getDisplayListCommand() {
		return COMMAND_DISPLAY_LIST;
	}
	
	/**
	 * Search Command, as viewed by the user.
	 */
	public String getDisplaySearchCommand() {
		return COMMAND_DISPLAY_SEARCH;
	}
	
	/**
	 * Sort Command, as viewed by the user.
	 */
	public String getDisplaySortCommand() {
		return COMMAND_DISPLAY_SORT;
	}
	
}
